﻿#include "ampsocket.h"

AMPsocket::AMPsocket() {}

void AMPsocket::setFreq(double freq)
{
    QString cmd = QString("FREQ %1MHz\n").arg((uint64_t)freq);
    send(cmd.toLatin1());
}

void AMPsocket::setChanl(int chanl)
{
    QString cmd = QString("SYST:CHL %1\n").arg(chanl);
    send(cmd.toLatin1());
}

void AMPsocket::setOut(bool state)
{
    QString cmd;
    if(state)
        cmd = QString("OUTP 1\n");
    else
        cmd = QString("OUTP 0\n");
    send(cmd.toLatin1());
}
